# -*- coding:UTF-8 -*-
import os,sys,time
def do_cmd(cmd,interl=60):
	while True:
		os.system(cmd)
		time.sleep(3)

if __name__ == "__main__":
	num_args = len(sys.argv) - 1
	if num_args < 1 or num_args > 3:
		print 'Usage:'+sys.argv[0]+" command [second_delay]"
		sys.exit(0)
	cmd = sys.argv[1]
	if num_args == 1:
		do_cmd(cmd)
	else:
		delay = int(sys.argv[2])
		do_cmd(cmd,delay)
